Skip to content

cleanup email after moving to django-post-office #6545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

escattone
Copy link
Contributor

No description provided.

@escattone escattone requested a review from akatsoulas March 6, 2025 21:39
@akatsoulas akatsoulas requested a review from Copilot March 10, 2025 12:14
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR cleans up the email configuration by removing legacy bandit integration and related configurations now that the project has switched to using django-post-office. Key changes include:

  • Removing "bandit" from INSTALLED_APPS and associated email backend configuration.
  • Updating the documentation and dependency configuration to reference post_office instead of bandit.
  • Removing the LoggingEmailBackend and its tests, along with the rate limiting functionality.

Reviewed Changes

File Description
kitsune/settings.py Removed bandit entries from installed apps and email settings.
docs/email.md Updated email backend configuration documentation for post_office.
pyproject.toml Removed the django-email-bandit dependency.
kitsune/lib/email.py Deleted LoggingEmailBackend and removed rate limiting code.
kitsune/lib/tests/test_email.py Removed tests for the legacy LoggingEmailBackend.

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

kitsune/lib/tests/test_email.py:1

  • The removal of tests for the legacy LoggingEmailBackend reduces coverage for email functionality. Please add tests to cover the new email backend behavior under django-post-office.
Entire file deleted

kitsune/lib/email.py:16

  • [nitpick] Ensure that the removal of the rate limiting functionality in SMTPEmailBackendWithSentryCapture is fully intentional and that no critical rate limiting behavior is required for production.
self.rate_limit = RateLimit(key="rate-limit-emails", rate="100/sec", wait_period=1, max_wait_period=30)

@escattone escattone merged commit f3f8676 into mozilla:main Mar 10, 2025
2 checks passed
@escattone escattone deleted the email-cleanup branch March 10, 2025 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants